package com.iss.itemplate.controller;

import com.iss.itemplate.dto.ErrorCode;
import com.iss.itemplate.dto.JsonResponseDto;
import com.iss.itemplate.service.HelloService;
import com.iss.itemplate.service.PayPalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by isoft-work 5 on 11/20/14.
 */
@Controller
public class PayPalController {
   @Autowired
   private PayPalService payPalService;
   @SuppressWarnings("rawtypes")
   @RequestMapping(value = "/payPal/checkOut", method = RequestMethod.POST)
   public @ResponseBody
   void insertAppInfo(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      payPalService.checkOut(request, response);
   }
}
